package com.bwie.service;

import com.bwie.pojo.TbOrders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bwie.pojo.vo.GrabOrderVo;
import com.bwie.pojo.vo.UserVo;
import com.bwie.utils.R;
import org.springframework.data.geo.GeoResult;
import org.springframework.data.redis.connection.RedisGeoCommands;

import java.util.List;

/**
 * @author xinH
 * @description 针对表【tb_orders(订单表)】的数据库操作Service
 * @createDate 2025-09-08 14:37:59
 */
public interface TbOrdersService extends IService<TbOrders> {


    R downOrder(TbOrders orders);

    void userToRedisGEO(UserVo userVo);

    List<GeoResult<RedisGeoCommands.GeoLocation<String>>> nearbyDriver(double longitude, double latitude, double radiusKm, long count);


    R distance(String placeId1, String placeId2, String unit);

    boolean driverGrabOrder(GrabOrderVo grabOrderVo);
}
